package xaj.scc.ast;

import polyglot.ext.jl.ast.Import_c;
import polyglot.main.Options;
import polyglot.util.CodeWriter;
import polyglot.util.Position;
import polyglot.visit.PrettyPrinter;

public class ImportSyntax_c extends Import_c implements ImportSyntax {

	public ImportSyntax_c(Position pos, Kind kind, String name) {
		super(pos, kind, name);
	}

    /** Write the import to an output file. */
    public void prettyPrint(CodeWriter w, PrettyPrinter tr) {
		if (! Options.global.fully_qualified_names) {
		    w.write("importsyntax ");
		    w.write(name);
		
		    if (kind == PACKAGE) {
		        w.write(".*");
		    }
		
		    w.write(";");
		    w.newline(0);
		}
    }

	@Override
	public void accept(Visitor v) {
		v.visitImportSyntax(this);
		
	}
	
}
